package com.entity;

import java.io.Serializable;

/**
 * @author 
 */
public class Goodtype implements Serializable {
    private Integer gtid;

    private String gname;

    private Integer gpraent;

    private static final long serialVersionUID = 1L;

    public Integer getGtid() {
        return gtid;
    }

    public void setGtid(Integer gtid) {
        this.gtid = gtid;
    }

    public String getGname() {
        return gname;
    }

    public void setGname(String gname) {
        this.gname = gname;
    }

    public Integer getGpraent() {
        return gpraent;
    }

    public void setGpraent(Integer gpraent) {
        this.gpraent = gpraent;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Goodtype other = (Goodtype) that;
        return (this.getGtid() == null ? other.getGtid() == null : this.getGtid().equals(other.getGtid()))
            && (this.getGname() == null ? other.getGname() == null : this.getGname().equals(other.getGname()))
            && (this.getGpraent() == null ? other.getGpraent() == null : this.getGpraent().equals(other.getGpraent()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGtid() == null) ? 0 : getGtid().hashCode());
        result = prime * result + ((getGname() == null) ? 0 : getGname().hashCode());
        result = prime * result + ((getGpraent() == null) ? 0 : getGpraent().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", gtid=").append(gtid);
        sb.append(", gname=").append(gname);
        sb.append(", gpraent=").append(gpraent);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}